﻿@model HouseAgencySite.Models.HomeModel
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "北京方圆和鑫房地产经纪有限公司-关于我们";
}
<div class="word"></div>
<div class="carousel slide" id="carousel-41679">
    <ol class="carousel-indicators">
        @if (Model.Banners != null && Model.Banners.Count > 0)
        {
            for (int i = 0; i < Model.Banners.Count; i++)
            {
            <li data-slide-to="@i" data-target="#carousel-41679" class="@(i == 0 ? "active" : "")"></li>                       
            }
        }
    </ol>
    <div class="carousel-inner">
        @if (Model.Banners != null && Model.Banners.Count > 0)
        {
            var i = 0;
            foreach (var item in Model.Banners)
            {
            <div class="item @(i == 0 ? "active" : "")">
                <img alt="" src="/images/@(item.AttachUrl)" style="margin:0px auto; height:450px" width="100%">
                <div class="carousel-caption" contenteditable="true">
                    <h4>@item.Title</h4>
                    <p class="text-center">@Html.Raw(item.Description)</p>
                </div>
            </div>
                i++;
            }
        }

    </div>
    <a data-slide="prev" href="#carousel-41679" class="left carousel-control text-center" style="width: 15%; vertical-align: middle; display: block; padding-top: 180px; line-height: 450px;">
        <div style="line-height: 450px; height: 100%;">
            <img src="@Url.Content("/content/images/prev.png")" />
        </div>
    </a>
    <a data-slide="next" href="#carousel-41679" class="right carousel-control text-center" style="width: 15%; vertical-align: middle; display: block; padding-top: 180px;">
        <div style="line-height: 300px; height: 100%;">
            <img src="@Url.Content("/content/images/next.png")" />
        </div>
    </a>
</div>
<div class="search-bg">
    <div class="search">
        <input class="search-input" onmouseover="this.select()" onfocus="this.select()" id="keywords" type="text" placeholder="请输入小区的名称、地址..." autocomplete="off">
        <a href="javascript:void(0);">
            <div class="search-button" ></div>
        </a>
    </div>
</div>
<div class="about">
    <div class="about-photo">
        <a href="/Home/Content/1">
            <img src="/content/images/fz_21.png" width="236" height="290"></a>
    </div>
    <div class="about-photo">
        <a href="/Home/Content/3">
            <img src="/content/images/fz_23.png" width="236" height="290"></a>
    </div>
    <div class="about-photo">
        <a href="/Home/Content/2">
            <img src="/content/images/fz_25.png" width="236" height="290"></a>
    </div>
</div>

<div class="culture">
    <div class="culture-photo">
        <img src="/content/images/fz_31.png" width="505" height="311">
    </div>
    <div class="culture-word">
        <div class="culture-word-1"></div>
        <div class="culture-word-2">            
            @Html.Raw(ViewBag.CompanyInfo)
        </div>
        <div class="culture-word-3"><a href="/Home/Content/5">>>详细</a></div>
    </div>
</div>
<div class="staff-bg">
    <div class="staff-title"></div>
    <div class="staff" id="staff">
        <div class="staffin">
            <div class="staff-1" id="staff-1">
                <ul>
                    @foreach (var photo in Model.Photos)
                    {
                        if (!string.IsNullOrEmpty(photo))
                        { 
                        <li><a href="#">
                            <img src="/images/@(photo)" width="136" height="186"></a></li>
                        }
                    }                 
                </ul>
            </div>
            <div class="staff-2" id="staff-2" />
        </div>
    </div>
</div>
<script>
    var speed = 10; //数字越大速度越慢
    var tab = document.getElementById("staff");
    var tab1 = document.getElementById("staff-1");
    var tab2 = document.getElementById("staff-2");
    tab2.innerHTML = tab1.innerHTML;
    function Marquee() {
        if (tab2.offsetWidth - tab.scrollLeft <= 0)
            tab.scrollLeft -= tab1.offsetWidth
        else {
            tab.scrollLeft++;
        }
    }
    var MyMar = setInterval(Marquee, speed);
    tab.onmouseover = function () { clearInterval(MyMar) };
    tab.onmouseout = function () { MyMar = setInterval(Marquee, speed) };

 
        $(function () {
            $(".search-button").click(function () {
                event.preventDefault();
                var key = $.trim($("#keywords").val());
                window.open("@(Url.Action("Search", new { pageIndex = 1 }))" + "&keywords=" + escape(key));
        });
    })
</script>


